import http from '@/utils'

class Classroom {
  // 获取列表  必传module 为module接口里的code
  getList(reload) {
      let url = '/classroom/index';
      return http.get(url, reload)
  }
  // 新增
  createClass(reload) {
      let url = '/classroom/create';
      return http.post(url, reload)
  }

  // 编辑
  editClass(reload) {
      let url = '/classroom/edit';
      return http.post(url, reload)
  }

  // 详情 detail 参数 id
  getClassDetail(reload) {
      let url = '/classroom/detail';
      return http.get(url, reload)
  }

  // 删除
  deleteClass(reload) {
      let url = '/classroom/delete';
      return http.post(url, reload)
  }

  // 更新唯一字段
  updateOnlyfield(reload) {
      let url = '/classroom/onlyfield';
      return http.post(url, reload)
  }

  // 获取一个班级的学员
  getClassStudent(reload) {
    let url = '/student/index';
    return http.get(url, reload)
}
}

export default new Classroom()